var express = require("express");
var router = express.Router();
var FontionCon = require("../controller/FontionModuleCon");
const multer = require("multer");
// 登录
router.post("/login", FontionCon.login);
// 文件导入
// 创建multer实例（上传文件）
const storage = multer.diskStorage({
  destination: function (req, file, callback) {
    callback(null, "./upload");
  },
  filename: function (req, file, cb) {
    cb(null, `${file.originalname}`);
  },
});
const upload = multer({ storage: storage });
router.post("/importFile", upload.array("file"), FontionCon.importFile);
// 查找新录入的物料
router.get("/FindMaterial", FontionCon.FindMaterial);
// 查找库存的物料
router.get("/Repertory", FontionCon.Repertory);

// 订单的修改
router.put("/updateRepertory", FontionCon.updateRepertory);


module.exports = router;
